package com.heisenhub.api.fileapi;


import com.heisenhub.api.fileapi.fallback.FileServiceFallback;
import com.heisenhub.file.common.dto.FileDto;
import com.heisnenhub.common.module.utils.Api;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

@FeignClient(value = "file", contextId = "fileClient", fallbackFactory = FileServiceFallback.class)
public interface FileService {

    /**
     * 文件上传
     * @param files  文件
     * @param fileDto  文件的属性
     * @return
     */
    @PostMapping("/uploadFile")
    Api uploadFile(@RequestParam(value = "files", required = true) MultipartFile[] files , FileDto fileDto);
}
